###
#S4 - writes out Figure 1 in main manuscript's data in tabular form


#Add variable for which Study in WTGN each value is from
#These are just hard coded based on row number
plot1justifiedmerged$study<-c(rep(3,6),rep(2,9),rep(1,9))

#drop unneeded columns
S4<-plot1justifiedmerged[,c(9,1:3,6:8,5)]

#round to two places
S4$smean<-round(S4$smean,2)
S4$se<-round(S4$se,2)
S4$lower<-round(S4$lower,2)
S4$upper<-round(S4$upper,2)

#add more descriptive column names
colnames(S4)<-c("Study","Condition","Sample","Mean","Standard Error","Lower 95% CI","Upper 95% CI","Observations")

#Put results from Figure 1 into tabular form.
write.csv(S4,"../Supplementary Results/TableS4.csv")